package com.pluginsacceptor.plugin.spreadsheet.table;

import javax.swing.AbstractListModel;

/**
 *  Creates a table to display the spreadsheet data
 */

public class SSTableHeaderModel extends AbstractListModel {

    private final int numCol;

    /**
     * Constructor
     * @param numCol the number column
     */
    public SSTableHeaderModel(final int numCol) {
        super();
        this.numCol = numCol;
    }

    @Override
    public int getSize() {
        return numCol;
    }

    @Override
    public Object getElementAt(final int index) {
        return Integer.toString(index + 1);
    }
}
